package com.tanhua.manager.interceptors;


import com.tanhua.domain.db.Admin;

public class AdminHolder {

    private static ThreadLocal<Admin> TL = new ThreadLocal<>();

    public static void setAdmin(Admin admin){
        TL.set(admin);
    }

    public static Admin getAdmin(){
       return TL.get();
    }
    public static Long getAdminId(){
       return TL.get().getId();
    }
    public static void removeAdmin(){
       TL.remove();
    }


}
